<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="../../sys/include/taglib.jsp"%>
<%@ page import="com.zzld.modules.autoinn.entity.Facilitator"%>
<html>
<head>
<%
	Facilitator fa = (Facilitator) request.getSession().getAttribute(
			"fa");
%>
<%@include file="../../sys/include/inhead.jsp"%>
<script type="text/javascript">
	$(window).load(function() {
		zzld.stopProgressBar();
	});

	$(function() {
		zzld.loadProgressBar();
		createTabPanel();
		createTab('工作台', ctx + '/f', false);
	});

	function panelCollapase() {
		$(".easyui-layout").layout('collapse', 'north');
	}

	var logoutFun = function() {
		$.messager.confirm('确认', "确定退出系统?", function(data) {
			if (data) {
				self.location = "${ctx}/autoinn/wxfacilitator/loginout";
			}

		});
	};
	
	var showMypass =function() {
		$('#dd').dialog({
			href : '${ctx}/autoinn/wxfacilitator/res/pass',
			width : 300,
			height : 170,
			modal : true,
			title : '修改密码',
			buttons : [ {
				text : '修改',
				iconCls : 'icon-add',
				handler : function() {
					var d = $(this).closest('.window-body');
					$('#facipass_updateForms').form('submit', {
						url : '${ctx}/autoinn/wxfacilitator/setting/showpass',
						success : function(result) {
							try {
								var r = $.parseJSON(result);
								if (r.success) {
									d.dialog('destroy');
								}
								$.messager.show({
									title : '温馨提示',
									msg : r.message
								});

							} catch (e) {
								$.messager.alert('温馨提示', e.message);
								return;
							}

						}
					});
				}

			} ],
			onClose : function() {
				$(this).dialog('destroy');
			}
		});

	};

	
</script>
</head>
<body class="easyui-layout" style="overflow-y: hidden" scroll="no">

	<noscript>您的浏览器不支持JavaScript,请检查您的浏览器版本或者安全设置,谢谢！</noscript>
	<!-- 顶部布局开始 -->
	<div data-options="region:'north', border:false"
		style="height: 70px; overflow: hidden; background: url('${ctxStatic}/images/logo.png') no-repeat;">


		<div id="sessionInfoDiv"
			style="position: absolute; right: 10px; top: 5px;">
			欢迎您:<%=fa.getName()%>
		</div>
		<div style="position: absolute; right: 0px; bottom: 0px;">
			<a href="javascript:void(0);" class="easyui-menubutton"
				data-options="menu:'#layout_north_kzmbMenu',iconCls:'ext-icon-cog'">控制面板</a>
			<a href="javascript:void(0);" class="easyui-menubutton"
				data-options="menu:'#layout_north_zxMenu',iconCls:'ext-icon-disconnect'">注销</a>
		</div>

		<div id="layout_north_kzmbMenu" style="width: 100px; display: none;">
			<div data-options="iconCls:'ext-icon-user_edit'"
				onclick="showMypass();">修改密码</div>

			<div class="menu-sep"></div>
			<div data-options="iconCls:'ext-icon-user'"
				onclick="showMyInfoFun();">我的信息</div>
		</div>
		<div id="dd"></div>
		<div id="layout_north_zxMenu" style="width: 100px; display: none;">
			<div data-options="iconCls:'ext-icon-door_out'"
				onclick="logoutFun();">退出系统</div>
		</div>
	</div>
	<!-- 顶部布局结束 -->

	<!-- 西布局开始 -->
	<div data-options="region:'west', split:true, title:'导航'"
		style="width: 250px;">
	   <jsp:include page="west.jsp"/>
		</div>
	
	<!-- 西布局结束 -->

	<!-- 中布局开始 -->
	<div id="zzld-index-center" data-options="region:'center'"
		style="padding-button: 5px;"></div>
	<!-- 中布局结束 -->

	<!-- 底部 -->
	<div region="south" border="false"
		style="height: 25px; overflow: hidden;">
		<div align="center" style="color: #CC99FF; padding-top: 2px">
			&copy; 版权所有 <span class="tip"> <a href="http://www.zzld.com"
				title="中正联达">中正联达</a> (推荐谷歌浏览器，获得更快响应速度)
			</span>
		</div>
	</div>

	<!-- menu begin -->
	<div id="zzld-index-tabsMenu" class="easyui-menu"
		style="width: 150px; display: none;">
		<div name="m-updateTab">刷新</div>
		<div class="menu-sep"></div>
		<div name="m-closeTab">关闭</div>
		<div name="m-closeAllTab">全部关闭</div>
		<div name="m-closeOtherTab">除此之外全部关闭</div>
		<div class="menu-sep"></div>
		<div name="m-closeThisLeft">当前页左侧全部关闭</div>
		<div name="m-closeThisRight">当前页右侧全部关闭</div>
	</div>
	<!-- menu end -->

	<!-- zzld-index-dialog开始 -->
	<div id="zzld-index-dialog" class="easyui-dialog"
		data-options="closed:'true'"></div>
	<!-- zzld-index-dialog结束 -->
</body>
</html>
